<html>
<head>
    <title>字典管理</title>

    <ex-section id="CSS">
        <style>
            .panel-body{
                height:500px;
                overflow:auto;
            }
        </style>
    </ex-section>
</head>
<body>

<div>
    <div class="row">
        <div id="leftArea" class="col-md-4">
            <div class="panel panel-grey">
                <div class="panel-heading">
                    <h3 class="panel-title" style="text-align: center;">字典组 &nbsp; <i id="addGroupBtn" class="fa fa-plus-square-o"></i></h3>
                </div>
                <div class="panel-body">
                    <ul id="dictGroup" class="list-group">
                    </ul>
                </div>
            </div>
        </div>

        <div id="rightArea" class="col-md-8">
            <div class="panel panel-grey">
                <div class="panel-heading">
                    <h3 class="panel-title" style="text-align: center">字典项 &nbsp; <i id="addItemBtn" class="fa fa-plus-square-o"></i></h3>
                </div>
                <div class="panel-body">
                    <div id="mainGrid">
                        <table id="btTable" class="table table-condensed table-hover table-striped"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="dictGroupModal">
        <form class="form-horizontal">
            <input type="hidden" id="dictGroupId"/>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>名称</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control" id="name" name="name">
                </div>
                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>Key</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control" id="key" name="key"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>排序号</span>
                </div>
                <div class="col-md-10">
                    <input class="form-control tree" id="sort" name="sort">
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span>描述</span>
                </div>
                <div class="col-md-10">
                    <textarea class="form-control" rows="5" id="description" name="description"></textarea>
                </div>
            </div>
        </form>
    </div>

    <div id="dictItemModal">
        <form class="form-horizontal">
            <input type="hidden" id="dictItemId"/>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span>上级字典项</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control" id="pId" name="pId"/>
                </div>

                <div class="col-md-2 text-right">
                    <span>字典项Key</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control tree" id="key" name="key">
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>字典项名</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control tree" id="name" name="name">
                </div>
                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>字典项值</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control tree" id="value" name="value">
                </div>
            </div>
            <div class="form-group">

                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>排序号</span>
                </div>
                <div class="col-md-10">
                    <input class="form-control tree" id="sort" name="sort">
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span>描述</span>
                </div>
                <div class="col-md-10">
                    <textarea class="form-control" rows="5" id="description" name="description"></textarea>
                </div>
            </div>
        </form>
    </div>
</div>

<ex-section id="ScriptBody">
    <script type="text/javascript" src="${request.contextPath}/js/main/modules/sys/dictList.js?v=<@spring.message 'js.version'/>"></script>
    <script type="text/javascript">
        pageLogic.initData = {
            modalParams: [
                {
                    id: "dictGroupModal",
                    width: 600,
                    height: 400,
                    title: "字典组"
                },

                {
                    id: "dictItemModal",
                    width: 700,
                    height: 500,
                    title: "字典项"
                }
            ],
            restUrlPrefix: "/sys/dicts",
            queryMsg: {}
        };

    </script>
</ex-section>
</body>
</html>
